package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * OrderGoods entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_ORDER_GOODS", schema = "MXZ")
public class OrderGoods extends Entity implements java.io.Serializable {

	// Fields

	private Long orderGoodsId;
	private Order order;
	private Long storeGoodsId;
	private String barCode;
	private String name;
	private Long goodsTime;
	private String unit;
	private Float price;
	private String buyUnit;
	private Float buyCount;
	private Float realCost;
	private String pic;
	private Long orderTime;
	private Integer type;
	private Boolean checked;
	private Float unitConvert;
	private Float reckonCount;
	private Float reckonCost;
	private Float realCount;
	private Float selfCost;

	// Constructors

	/** default constructor */
	public OrderGoods() {
	}

	/** minimal constructor */
	public OrderGoods(Order order, Long storeGoodsId, String barCode,
			String name, Long goodsTime, String unit, Float price,
			Float buyCount, Float realCost, Long orderTime, Integer type,
			Boolean checked, Float reckonCost, Float realCount, Float selfCost) {
		this.order = order;
		this.storeGoodsId = storeGoodsId;
		this.barCode = barCode;
		this.name = name;
		this.goodsTime = goodsTime;
		this.unit = unit;
		this.price = price;
		this.buyCount = buyCount;
		this.realCost = realCost;
		this.orderTime = orderTime;
		this.type = type;
		this.checked = checked;
		this.reckonCost = reckonCost;
		this.realCount = realCount;
		this.selfCost = selfCost;
	}

	/** full constructor */
	public OrderGoods(Order order, Long storeGoodsId, String barCode,
			String name, Long goodsTime, String unit, Float price,
			String buyUnit, Float buyCount, Float realCost, String pic,
			Long orderTime, Integer type, Boolean checked, Float unitConvert,
			Float reckonCount, Float reckonCost, Float realCount, Float selfCost) {
		this.order = order;
		this.storeGoodsId = storeGoodsId;
		this.barCode = barCode;
		this.name = name;
		this.goodsTime = goodsTime;
		this.unit = unit;
		this.price = price;
		this.buyUnit = buyUnit;
		this.buyCount = buyCount;
		this.realCost = realCost;
		this.pic = pic;
		this.orderTime = orderTime;
		this.type = type;
		this.checked = checked;
		this.unitConvert = unitConvert;
		this.reckonCount = reckonCount;
		this.reckonCost = reckonCost;
		this.realCount = realCount;
		this.selfCost = selfCost;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_ORDER_GOODS")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "ORDER_GOODS_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getOrderGoodsId() {
		return this.orderGoodsId;
	}

	public void setOrderGoodsId(Long orderGoodsId) {
		this.orderGoodsId = orderGoodsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORDER_ID", nullable = false)
	public Order getOrder() {
		return this.order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	@Column(name = "STORE_GOODS_ID", nullable = false, precision = 15, scale = 0)
	public Long getStoreGoodsId() {
		return this.storeGoodsId;
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		this.storeGoodsId = storeGoodsId;
	}

	@Column(name = "BAR_CODE", nullable = false, length = 20)
	public String getBarCode() {
		return this.barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	@Column(name = "NAME", nullable = false, length = 250)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "GOODS_TIME", nullable = false, precision = 15, scale = 0)
	public Long getGoodsTime() {
		return this.goodsTime;
	}

	public void setGoodsTime(Long goodsTime) {
		this.goodsTime = goodsTime;
	}

	@Column(name = "UNIT", nullable = false, length = 30)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "PRICE", nullable = false, precision = 8)
	public Float getPrice() {
		return this.price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	@Column(name = "BUY_UNIT", length = 30)
	public String getBuyUnit() {
		return this.buyUnit;
	}

	public void setBuyUnit(String buyUnit) {
		this.buyUnit = buyUnit;
	}

	@Column(name = "BUY_COUNT", nullable = false, precision = 8, scale = 1)
	public Float getBuyCount() {
		return this.buyCount;
	}

	public void setBuyCount(Float buyCount) {
		this.buyCount = buyCount;
	}

	@Column(name = "REAL_COST", nullable = false, precision = 8)
	public Float getRealCost() {
		return this.realCost;
	}

	public void setRealCost(Float realCost) {
		this.realCost = realCost;
	}

	@Column(name = "PIC", length = 100)
	public String getPic() {
		return this.pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@Column(name = "ORDER_TIME", nullable = false, precision = 15, scale = 0)
	public Long getOrderTime() {
		return this.orderTime;
	}

	public void setOrderTime(Long orderTime) {
		this.orderTime = orderTime;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "CHECKED", nullable = false, precision = 1, scale = 0)
	public Boolean getChecked() {
		return this.checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	@Column(name = "UNIT_CONVERT", precision = 8, scale = 1)
	public Float getUnitConvert() {
		return this.unitConvert;
	}

	public void setUnitConvert(Float unitConvert) {
		this.unitConvert = unitConvert;
	}

	@Column(name = "RECKON_COUNT", precision = 8, scale = 1)
	public Float getReckonCount() {
		return this.reckonCount;
	}

	public void setReckonCount(Float reckonCount) {
		this.reckonCount = reckonCount;
	}

	@Column(name = "RECKON_COST", nullable = false, precision = 8)
	public Float getReckonCost() {
		return this.reckonCost;
	}

	public void setReckonCost(Float reckonCost) {
		this.reckonCost = reckonCost;
	}

	@Column(name = "REAL_COUNT", nullable = false, precision = 8)
	public Float getRealCount() {
		return this.realCount;
	}

	public void setRealCount(Float realCount) {
		this.realCount = realCount;
	}

	@Column(name = "SELF_COST", nullable = false, precision = 8)
	public Float getSelfCost() {
		return this.selfCost;
	}

	public void setSelfCost(Float selfCost) {
		this.selfCost = selfCost;
	}

}